<template>
    <div>
        <Header>
            <template v-slot:title>
                修改个人信息
            </template>
              <template v-slot:right >
               <span @click="bc">
                保存
                </span> 
            </template>
        </Header>
      <ul>
        <li @click="nan">
            <p>男</p>
            <p v-show="value==0"><van-icon name="success" /></p>
        </li>
        <li @click="nu">
            <p>女</p>
            <p v-show="value==1"><van-icon name="success" /></p>
        </li>
      </ul>
    </div>
</template>

<script>
import  Header  from "../Bar";
import {users} from "../../Request/http.js";
export default {
    components:{Header},
    name: 'EverydaySetsex',

    data() {
        return {
            value:"",
            show:false
        };
    },

    mounted() {
        this.value=this.$route.query.sex
    },

    methods: {
        bc(){
            users({sex:this.value}).then(res=>{
                console.log(this.value);
                console.log(res);
                this.$router.push('/info')
            })
        },
        nan(){
            this.value=0
        },
        nu(){
            this.value=1
        }
    },
};
</script>

<style lang="scss" scoped>
ul{
  background: #fff;
    li{
        padding: 0rem 0.2rem;
        display: flex;
        flex-direction:row;
        justify-content: space-between;
    }
}
</style>